3.147 \(\int (a-a \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=16 \[ a x-\frac{a \tan (c+d x)}{d} \]

[Out]

a*x - (a*Tan[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0126255, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3767, 8} \[ a x-\frac{a \tan (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[a - a*Sec[c + d*x]^2,x]

[Out]

a*x - (a*Tan[c + d*x])/d

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \left (a-a \sec ^2(c+d x)\right ) \, dx &=a x-a \int \sec ^2(c+d x) \, dx\\ &=a x+\frac{a \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=a x-\frac{a \tan (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0062625, size = 26, normalized size = 1.62 \[ -a \left (\frac{\tan (c+d x)}{d}-\frac{\tan ^{-1}(\tan (c+d x))}{d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[a - a*Sec[c + d*x]^2,x]

[Out]

-(a*(-(ArcTan[Tan[c + d*x]]/d) + Tan[c + d*x]/d))

________________________________________________________________________________________

Maple [A]  time = 0.014, size = 17, normalized size = 1.1 \begin{align*} ax-{\frac{a\tan \left ( dx+c \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a-a*sec(d*x+c)^2,x)

[Out]

a*x-a*tan(d*x+c)/d

________________________________________________________________________________________

Maxima [A]  time = 1.05065, size = 22, normalized size = 1.38 \begin{align*} a x - \frac{a \tan \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a-a*sec(d*x+c)^2,x, algorithm="maxima")

[Out]

a*x - a*tan(d*x + c)/d

________________________________________________________________________________________

Fricas [A]  time = 0.465543, size = 76, normalized size = 4.75 \begin{align*} \frac{a d x \cos \left (d x + c\right ) - a \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a-a*sec(d*x+c)^2,x, algorithm="fricas")

[Out]

(a*d*x*cos(d*x + c) - a*sin(d*x + c))/(d*cos(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - a \left (\int \left (-1\right )\, dx + \int \sec ^{2}{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a-a*sec(d*x+c)**2,x)

[Out]

-a*(Integral(-1, x) + Integral(sec(c + d*x)**2, x))

________________________________________________________________________________________

Giac [A]  time = 1.31491, size = 22, normalized size = 1.38 \begin{align*} a x - \frac{a \tan \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a-a*sec(d*x+c)^2,x, algorithm="giac")

[Out]

a*x - a*tan(d*x + c)/d